function loginDialog(){
	swal({
		  title: '重新登录！',
		  text: "登录失效，请重新登录！",
		  type: 'warning',
		  confirmButtonColor: '#3085d6',
		  confirmButtonText: '确定',
		}).then(function () {
			var localObj = window.location;
			var contextPath = localObj.pathname.split("/")[1];
			var basePath = localObj.protocol+"//"+localObj.host+"/"+contextPath;
			window.location.href=basePath;
		})
}

function successDialog(title,content){
	swal({
		  title: title,
		  text: content,
		  timer: 1500,
		  type:"success",
		  animation :true,
		  showConfirmButton: false
		}
	).then(
	  function () {},
	  // handling the promise rejection
	  function (dismiss) {
	  }
	)
}

function errorDialog(title,content){
	swal({
		  title: title,
		  text: content,
		  timer: 1500,
		  type:"error",
		  animation :true,
		  showConfirmButton: false
		}
	).then(
	  function () {},
	  // handling the promise rejection
	  function (dismiss) {
	  }
	)
}
function promptDialog(title,content){
	swal({
		  title: title,
		  text: content,
		  timer: 2000,
		  type:"error"
		}).then(
		  function () {},
		  // handling the promise rejection
		  function (dismiss) {
		    if (dismiss === 'timer') {
		    }
		  }
		)
}

function commomDialog (title,content){
	swal({
		  title: title,
		  text:content,
		  padding: 20,
		})
}
//点击ok跳转链接
function SuccessDialogByUrl(title,content,url){
	swal({
		   title: title,
		   text: content,
		   timer: 1500,
		   type:"success",
		   showConfirmButton: false
		 }
		).then(function (dismiss) {
		   window.location.href=url;
		})
}

//点击ok跳转链接
function SuccessDialogByUrlNow(title,content,url){
    swal(
        title,
        content,
        'success'
    ).then(function () {
        window.location.href=url;
    })
}

